//
//  CALayer+Normal.m
//  coyote
//
//  Created by jenkins on 2023/3/17.
//  Copyright © 2023 500wan. All rights reserved.
//

#import "CALayer+Normal.h"

@implementation CALayer (Normal)
-(void) setCorners:(UIRectCorner) corners radius:(CGFloat) radius{
    
    
    UIBezierPath*maskPath =[UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:corners cornerRadii:CGSizeMake(radius, radius)];

    CAShapeLayer*maskLayer =[[CAShapeLayer alloc]init];

    //设置大小

    maskLayer.frame =self.bounds;

    //设置图形样子

    maskLayer.path =maskPath.CGPath;

    self.mask=maskLayer;
    
}
@end
